commit fd28188663a1c3ee4cb012187b262efabcd71f9c
Author: Daniel Kolesa <daniel@octaforge.org>
Date:   Fri Dec 17 02:27:46 2021 +0100

    posix shell compatibility

diff --git a/scripts/xdg-settings.in b/scripts/xdg-settings.in
index ab18d3a..5c17092 100755
--- a/scripts/xdg-settings.in
+++ b/scripts/xdg-settings.in
@@ -234,9 +234,9 @@ check_browser_kde()
     binary="`resolve_kde_browser`"
 
     # The browser may contain a relative entry to the binary starting with !
-    if [ x"!" == x"${browser:0:1}" ]; then
+    if [ x"!" == x"$(echo $browser|cut -c 1)" ]; then
         # get the full path
-        browser="`binary_to_desktop_file ${browser:1}`"
+        browser="`binary_to_desktop_file $(echo $browser|cut -b 2-)`"
         binary="`desktop_file_to_binary $browser`"
     fi
 
@@ -596,9 +596,9 @@ check_url_scheme_handler_kde()
     if [ x"$1" = "mailto" ]; then
         binary="`read_kde_config emaildefaults PROFILE_Default EmailClient`"
         # The field may contain a relative entry to the binary starting with !
-        if [ x"!" == x"${binary:0:1}" ]; then
+        if [ x"!" == x"$(echo $binary|cut -c 1)" ]; then
             # get the full path
-            desktop_file="`binary_to_desktop_file ${binary:1}`"
+            desktop_file="`binary_to_desktop_file $(echo $binary|cut -b 2-)`"
             binary="`desktop_file_to_binary $desktop_file`"
         fi
         if [ x"$binary" != x"$check" ]; then
